#pragma once
#include "precompiled.h"
#include "Model.h"

#include "../include/IL/il.h"

namespace ModelLoader{

	static const int ATTRIB_LOCATION_POSITION = 0;
	static const int ATTRIB_LOCATION_NORMAL = 1;
	static const int ATTRIB_LOCATION_TEXCOORD = 2;

	extern void createAILogger();

	extern void destroyAILogger();

	extern void logInfo(std::string logString);

	extern void logDebug(const char* logString);

	
	extern bool Import3DFromFile( const std::string& pFile);
	
	//	Deletes all temporary mesh data.
	extern void clear_meshdata();


	extern void AiTransformTo_Mat4(aiMatrix4x4 const &aim, glm::mat4 &idm);
	
	extern void LoadAiScene_ToMeshData (const struct aiScene *sc, const struct aiNode* nd);

	extern void MeshDataTo_Buffers(std::vector<Vertex_PNT> &vertex_data, std::vector<GLushort> &index_data);

	extern void load_myModel(const char* path, Model &model);

	extern void create_plane(Model &model);

	extern int numIndices(int index);
}